<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8" />
  <title>index</title>
  <!-- 引入Vue -->
  <script type="text/javascript" src="../../js/vue.js"></script>
</head>

<body>
  <!-- 准备好一个容器-->
  <ul id="demo">
    <!-- key绑定的是数组的下标 -->
    <li v-for="(item,index) in items">{{item.name}}+{{index}}</li>
  </ul>
</body>
<script type="text/javascript">
  // 创建Vue实例
  let vm = new Vue({
    el: '#demo',
    data() {
      return {
        items: [
          { name: '张三' },
          { name: '李四' },
          { name: '王五' },
        ]
      }
    }
  })
</script>

</html>